<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
<f:view locale="es" contentType="text/html">
    <h:head>
        <ui:insert name="header">
            <ui:include src="header.xhtml"/>
        </ui:insert>
        <script type="text/javascript">
            function upperInput() {
                jQuery("input.ui-inputtext[type='text']").blur(function(){
                    jQuery(this).val(jQuery(this).val().toUpperCase());
                })
            }

            function validarInit() {
                upperInput();
            }
        </script>
    </h:head>
    <h:body onload="validarInit();">
        <h:panelGrid cellspacing="0" cellpadding="0" styleClass="wrapper" width="100%" >
            <h:panelGrid columns="1" style="width:100%;" >
                <h:panelGrid columns="1" cellspacing="0" cellpadding="0" width="100%" >
                    <h:panelGrid columns="2" cellspacing="0" cellpadding="0" style="float: right !important; margin-right: 80px !important;">
                        <h:panelGroup>
                            <p:outputLabel value="User: " styleClass="labelInfoUser"/>
                            <p:outputLabel value="#{viewInfoMgr.userInfo.username}" styleClass="valueInfoUser"/>
                            <p:outputLabel value=" | " styleClass="labelInfoUser"/>
                            <p:outputLabel value="Nombre Completo: " styleClass="labelInfoUser"/>
                            <p:outputLabel value="#{viewInfoMgr.userInfo.fullName}" styleClass="valueInfoUser"/>
                            <p:outputLabel value=" | " styleClass="labelInfoUser"/>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:form>
                                <h:outputLink value="#{request.contextPath}/j_spring_security_logout" styleClass="labelInfoUser" style="display: inline-block;">
                                    Logout
                                </h:outputLink>
                            </h:form>
                        </h:panelGroup>
                    </h:panelGrid>
                </h:panelGrid>
                <h:panelGrid columns="1" width="97%">
                    <h:form>
                        <p:menubar model="#{viewInfoMgr.toolBarMenu}"/>
                    </h:form>
                </h:panelGrid>
            </h:panelGrid>
            <h:panelGrid columns="1" width="100%" >
                <h:panelGroup>
                    <h:panelGrid cellspacing="0" cellpadding="0" styleClass="content" >
                        <ui:insert name="content"/>
                        <p:ajaxStatus onstart="PF('wstatusDialog').show();" onsuccess="PF('wstatusDialog').hide();"/>
                        <p:dialog modal="true" widgetVar="wstatusDialog" showHeader="false" id="statusDialog"
                                  resizable="false" draggable="false" closable="false" position="center"
                                  appendTo="@(body)">
                            <p:graphicImage value="/resources/images/ajaxloadingbar.gif"/>
                        </p:dialog>

                    </h:panelGrid>
                    <ui:insert name="footer">
                        <ui:include src="footer.xhtml"/>
                    </ui:insert>
                    <ui:insert name="modal">
                        <ui:decorate template="/pages/base/customMessage.xhtml">
                        </ui:decorate>
                    </ui:insert>
                </h:panelGroup>
            </h:panelGrid>
        </h:panelGrid>
    </h:body>
</f:view>
</html>